<?php

require_once dirname(__FILE__).'/../lib/rubriqueGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/rubriqueGeneratorHelper.class.php';

/**
 * rubrique actions.
 *
 * @package    theconnexter
 * @subpackage rubrique
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class rubriqueActions extends autoRubriqueActions
{
	public function executeBatchActive(sfWebRequest $request){
		$this->updateTable($request,1);
	}
	public function executeBatchDesactive(sfWebRequest $request){
		$this->updateTable($request,0);
	}
	public function updateTable(sfWebRequest $request,$etat){
		$ids = $request->getParameter('ids');
		foreach($ids as $id){
			Doctrine_core::getTable('rubrique')->activeDeactiveRubrique($id, $etat);
		}
	}
}
